Add -b flag to init subcommand#119
Conversation
ecac100 to
1f1634f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 87.69% 86.65% -1.04%
==========================================
Files 60 60
Lines 2463 2481 +18
Branches 304 307 +3
==========================================
- Hits 2160 2150 -10
- Misses 303 331 +28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/subcommand/init_subcommand.cpp
Outdated
| if (m_branch.empty()) | ||
| { | ||
| auto repo = repository_wrapper::init(m_directory, m_bare); | ||
| path = repo.path(); |
There was a problem hiding this comment.
This line is now that same here and in the else branch below, so it could be moved outside the end of the if-else.
There was a problem hiding this comment.
It can't, because the repo doesn't exist outside of the if-else. I tried to change that using something like repository_wrapper repo = [this](){if-else}() but there was a problem with the init then.
I gave it anohter try and it seem to work.
ianthomas23
left a comment
There was a problem hiding this comment.
OK, let's merge. Thanks @SandrineP
Add
-bflag toinitsubcommandRemove usage of
gitin tests